1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for detecting moiré generated when converting a multi-tone image into an image with fewer tones.
2. Description of the Related Art
Printing image data processed by a computer on printing paper or displaying the image on a display apparatus has become widespread in recent years. In such print or display processing, when the number of tones per pixel is compared between the images before and after output, the number of tones the printing apparatus or display apparatus can express may be smaller than the number of tones expressing image data on the computer. When outputting to such printing apparatus or display apparatus, halftone processing is often performed to convert multi-tone image data into image data with fewer tones. However, the image quality may be degraded due to moiré generated by halftone processing, and a measure is demanded for this problem.
Ordered dithering is known as one of the halftone processing methods, which determines the output value by comparison with periodically repeating thresholds. In the ordered dithering, when an input includes a spatial frequency component close to the threshold cycle, moiré corresponding to the difference between the threshold and the spatial frequency is generated. Another known example of halftone processing is the error diffusion method. In the error diffusion method, when an input has a flat specific density, moiré is generated due to a repetitive structure with a specific pattern.
One of the techniques for detecting such moiré uses the difference between input image data and halftone-processed image data (for example, Japanese Patent Laid-Open No. 9-238259). According to this method, the difference data between input image data and halftone-processed image data is obtained. A moiré component is then extracted by bandpass filter processing of the difference data.
There also exists a method of detecting moiré by performing filter processing based on visual characteristics for halftone-processed image data obtained by applying halftone processing to input image data (for example, Japanese Patent Laid-Open No. 2001-86355). According to this method, filter processing based on visual characteristics is performed for each of the halftone-processed image data obtained by applying halftone processing to input image data and image data obtained by shifting the input image data by a ½ phase and then applying halftone processing to it. The difference between the filtered image data is evaluated.
According to the above-described conventional moiré detection method, when a document that has already been halftone-processed and printed is read, further processed, and output, it is impossible to appropriately detect only the moiré generated at the time of processing. That is, when halftone-processed image data has undergone another halftone processing, it is difficult to detect the presence/absence of moiré.
In the above-described case, conventionally, halftone dots are detected by pattern detection or the like. The portion detected as the halftone dots is subjected to smoothing and then to halftone processing. However, to detect halftone dots by pattern detection, patterns need to be prepared in accordance with the number of lines of halftone dots or the reading resolution, resulting in an increase in the processing amount and the circuit scale. In addition, since pattern matching is performed, a detection error or detection oversight occurs inevitably. To increase the accuracy, it is necessary to refer to pixels in a wide range or perform complex processing such as isolated point processing or expansion processing. When halftone processing is performed for a faint thin line, the reproducibility of the thin line greatly varies depending on the tilt of the thin line or the phase of the screen angle. Only one technique of coping with this is edge enhancement.